package MyTest;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import net.sf.json.JSONObject;

import org.apache.commons.lang.StringUtils;

public class Test1 {

	/**
	 * @param args
	 * @throws ParseException 
	 */
	public static void main(String[] args) throws ParseException {
		System.out.println("ABC".split("")[1]);
		System.out.println(Integer.parseInt("12314")+"---"+Integer.parseInt("12341"));
		
		String regEx="[^0-9]";   
		Pattern p = Pattern.compile(regEx);   
		Matcher m1 = p.matcher("abad3d5f6");   
		Matcher m2 = p.matcher("1d2dh4a2");   
		String v1 = m1.replaceAll("").trim();
		String v2 = m2.replaceAll("").trim();
		System.out.println(Integer.parseInt(v1)>Integer.parseInt(v2));
		System.out.println(Integer.parseInt(v1)+"--------"+Integer.parseInt(v2));
		SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
		System.out.println(sf.parse("2013-07-05"));
		
		//string的替换
		String s1 = "d:/a/b/c.jpg";
		String s2 = "http://localhost:8080/a/b/c.jpg";
		System.out.println(s2.replace("http://localhost:8080", "d:").equals(s1));
		System.out.println(s2);
		
		 System.out.println(StringUtils.isBlank("null"));
		 //字符串截取
		 String str = "http://192.168.3.23:8080/downloadserver/gameplatform/game/apk/160/apkurl/7RHn88JFP9xHj1XUIkGD.apk";
		 System.out.println(str.substring(str.lastIndexOf("/")+1));
		 
	}
}
